package com.poorstu.dao.impl;

import java.util.List;

import com.common.base.dao.impl.BaseDaoImpl;
import com.poorstu.dao.LoadDao;
import com.poorstu.model.AuditsMod;
import com.poorstu.model.LoadMod;
import com.poorstu.model.LoadMoneyMod;

public class LoadDaoImpl extends BaseDaoImpl implements LoadDao {

	public List<LoadMoneyMod> selectLoadMoneyAll() {
		return super.findAll("LoadMoneyMod");
	}

	public void saveLoad(LoadMod LoadMod) {
		super.save(LoadMod);
	}

	public void updateLoad(LoadMod loadMod) {
		super.merge(loadMod);
		
	}

	public void saveAudit(AuditsMod auditsMod) {
		super.save(auditsMod);
	}

	public List<LoadMod> selectLoadByRoleAndStatus(int roleId) {
		return super.findByHql("select l.auditss.audStatus.flow.flowLineList.role.roleId from LoadMod l where l.auditss.audStatus=l.auditss.audStatus.flow.flowLineList.orders");
	}

	public void updateAudit(AuditsMod auditMod) {
		super.merge(auditMod);
	}
	
	
	
	public AuditsMod selectAuditById(int auditId) {
		// TODO Auto-generated method stub
		return (AuditsMod)super.findByHql("from AuditsMod where auditId="+auditId).get(0);
	}
	
	public  List<LoadMod> selectLoadAll(){
		
		return super.findAll("LoadMod");
	}

	public void loadDelete(LoadMod loadMod) {
		super.delete(loadMod);
	}
	
	

}
